home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / c / gcc261ud-c.lha / gnu / os-include / inline / bullet.h < prev    next >
C/C++ Source or Header  |  1994-09-22  |  3KB  |  110 lines

  1. #ifndef _INLINE_BULLET_H
  2. #define _INLINE_BULLET_H
  3.  
  4. #include <sys/cdefs.h>
  5. #include <inline/stubs.h>
  6.  
  7. __BEGIN_DECLS
  8.  
  9. #ifndef BASE_EXT_DECL
  10. #define BASE_EXT_DECL
  11. #define BASE_EXT_DECL0 extern struct Library * BulletBase;
  12. #endif
  13. #ifndef BASE_PAR_DECL
  14. #define BASE_PAR_DECL
  15. #define BASE_PAR_DECL0 void
  16. #endif
  17. #ifndef BASE_NAME
  18. #define BASE_NAME BulletBase
  19. #endif
  20.  
  21. BASE_EXT_DECL0
  22.  
  23. extern __inline void 
  24. CloseEngine (BASE_PAR_DECL struct GlyphEngine *glyphEngine)
  25. {
  26.   BASE_EXT_DECL
  27.   register struct Library *a6 __asm("a6") = BASE_NAME;
  28.   register struct GlyphEngine *a0 __asm("a0") = glyphEngine;
  29.   __asm __volatile ("jsr a6@(-0x24)"
  30.   : /* no output */
  31.   : "r" (a6), "r" (a0)
  32.   : "a0","a1","d0","d1", "memory");
  33. }
  34. extern __inline ULONG 
  35. ObtainInfoA (BASE_PAR_DECL struct GlyphEngine *glyphEngine,struct TagItem *tagList)
  36. {
  37.   BASE_EXT_DECL
  38.   register ULONG  _res  __asm("d0");
  39.   register struct Library *a6 __asm("a6") = BASE_NAME;
  40.   register struct GlyphEngine *a0 __asm("a0") = glyphEngine;
  41.   register struct TagItem *a1 __asm("a1") = tagList;
  42.   __asm __volatile ("jsr a6@(-0x30)"
  43.   : "=r" (_res)
  44.   : "r" (a6), "r" (a0), "r" (a1)
  45.   : "a0","a1","d0","d1", "memory");
  46.   return _res;
  47. }
  48. #ifndef NO_INLINE_STDARG
  49. #define ObtainInfo(a0, tags...) \
  50.   ({ struct TagItem _tags[] = { tags }; ObtainInfoA ((a0), _tags); })
  51. #endif /* not NO_INLINE_STDARG */
  52. extern __inline struct GlyphEngine *
  53. OpenEngine (BASE_PAR_DECL0)
  54. {
  55.   BASE_EXT_DECL
  56.   register struct GlyphEngine * _res  __asm("d0");
  57.   register struct Library *a6 __asm("a6") = BASE_NAME;
  58.   __asm __volatile ("jsr a6@(-0x1e)"
  59.   : "=r" (_res)
  60.   : "r" (a6)
  61.   : "a0","a1","d0","d1", "memory");
  62.   return _res;
  63. }
  64. extern __inline ULONG 
  65. ReleaseInfoA (BASE_PAR_DECL struct GlyphEngine *glyphEngine,struct TagItem *tagList)
  66. {
  67.   BASE_EXT_DECL
  68.   register ULONG  _res  __asm("d0");
  69.   register struct Library *a6 __asm("a6") = BASE_NAME;
  70.   register struct GlyphEngine *a0 __asm("a0") = glyphEngine;
  71.   register struct TagItem *a1 __asm("a1") = tagList;
  72.   __asm __volatile ("jsr a6@(-0x36)"
  73.   : "=r" (_res)
  74.   : "r" (a6), "r" (a0), "r" (a1)
  75.   : "a0","a1","d0","d1", "memory");
  76.   return _res;
  77. }
  78. #ifndef NO_INLINE_STDARG
  79. #define ReleaseInfo(a0, tags...) \
  80.   ({ struct TagItem _tags[] = { tags }; ReleaseInfoA ((a0), _tags); })
  81. #endif /* not NO_INLINE_STDARG */
  82. extern __inline ULONG 
  83. SetInfoA (BASE_PAR_DECL struct GlyphEngine *glyphEngine,struct TagItem *tagList)
  84. {
  85.   BASE_EXT_DECL
  86.   register ULONG  _res  __asm("d0");
  87.   register struct Library *a6 __asm("a6") = BASE_NAME;
  88.   register struct GlyphEngine *a0 __asm("a0") = glyphEngine;
  89.   register struct TagItem *a1 __asm("a1") = tagList;
  90.   __asm __volatile ("jsr a6@(-0x2a)"
  91.   : "=r" (_res)
  92.   : "r" (a6), "r" (a0), "r" (a1)
  93.   : "a0","a1","d0","d1", "memory");
  94.   return _res;
  95. }
  96. #ifndef NO_INLINE_STDARG
  97. #define SetInfo(a0, tags...) \
  98.   ({ struct TagItem _tags[] = { tags }; SetInfoA ((a0), _tags); })
  99. #endif /* not NO_INLINE_STDARG */
  100.  
  101. #undef BASE_EXT_DECL
  102. #undef BASE_EXT_DECL0
  103. #undef BASE_PAR_DECL
  104. #undef BASE_PAR_DECL0
  105. #undef BASE_NAME
  106.  
  107. __END_DECLS
  108.  
  109. #endif /* _INLINE_BULLET_H */
  110.